<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
		<title>Insert title here</title>
		<script type="text/javascript" src="loaderUtil.js"></script>
		<script type="text/javascript" src="../lib/prototype-1.6.0.3.js"></script>
		<script type="text/javascript">
			var AlertOnClick = Class.create({
			  initialize: function(msg) {
			    this.msg = msg;
			  },
			  handleClick: function(event) {
			    event.stop();
			    alert(this.msg);
			    this.prueba();
			  }
			});

			function prueba (){
				this.msg = this.msg + " prueba Exitosa...";
			}
			
			var j = new AlertOnClick("Hola...");


			window.onload = function(){
				//var loader = new Loader("mask", "loader");
				//loader.show();
				//window.onresize = function(){
				//	loader.adjustSize();
				//}
				alert(j.handleClick.bind(j));
				$('monitor').observe('click', j.handleClick.bind(j).bind(j)); // <= WRONG
				//$('bar').observe('click', myalert.handleClick.bind(myalert)); // <= RIGHT
									
			}
		</script>
	</head>
	<body>
	 	<div id="monitor">monitor</div>
		<input /><br /><br /><br /><br /><br /><br /><br /><br />kjhhhkhkjkjh
		<br /><br /><br /><br /><br /><br /><br /><br />kjhhhkhkjkjh
		<br /><br /><br /><br /><br /><br /><br /><br />kjhhhkhkjkjh
		<br /><br /><br /><br /><br /><br /><br /><br />kjhhhkhkjkjh
		<br /><br /><br /><br /><br /><br /><br /><br />kjhhhkhkjkjh
		<br /><br /><br /><br /><br /><br /><br /><br />kjhhhkhkjkjh
		<br /><br /><br /><br /><br /><br /><br /><br />kjhhhkhkjkjh
		<br /><br /><br /><br /><br /><br /><br /><br />kjhhhkhkjkjh<br /><br /><br /><br /><br /><br /><br /><br />kjhhhkhkjkjh
		<br /><br /><br /><br /><br /><br /><br /><br />kjhhhkhkjkjh
		<br /><br /><br /><br /><br /><br /><br /><br />kjhhhkhkjkjh
		<br /><br /><br /><br /><br /><br /><br /><br />kjhhhkhkjkjh
		<br /><br /><br /><br /><br /><br /><br /><br />kjhhhkhkjkjh
		<br /><br /><br /><br /><br /><br /><br /><br />kjhhhkhkjkjh
		<br /><br /><br /><br /><br /><br /><br /><br />kjhhhkhkjkjh<br /><br /><br /><br /><br /><br /><br /><br />kjhhhkhkjkjh
		<br /><br /><br /><br /><br /><br /><br /><br />kjhhhkhkjkjh
		<br /><br /><br /><br /><br /><br /><br /><br />kjhhhkhkjkjh
		<br /><br /><br /><br /><br /><br /><br /><br />kjhhhkhkjkjh
		<br /><br /><br /><br /><br /><br /><br /><br />kjhhhkhkjkjh
		<br /><br /><br /><br /><br /><br /><br /><br />kjhhhkhkjkjh
		<br /><br /><br /><br /><br /><br /><br /><br />kjhhhkhkjkjh
		<div id="progress"> 
			<div id="mask" style="display: none;"></div>
			<div id="loader" style="display: none;">	
				<div style="font-weight: bold; color: white; font-size: 12pt;">
					<br /><br />
					<span>Procesando...</span>
				</div>
			</div>
		</div>
		
	</body>
</html>